home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / slip.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  2KB  |  57 lines

  1. /* Mods by G1EMM */
  2. #ifndef    _SLIP_H
  3. #define    _SLIP_H
  4.  
  5. #ifndef    _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.  
  9. #ifndef _IFACE_H
  10. #include "iface.h"
  11. #endif
  12.  
  13. #ifndef _SLHC_H
  14. #include "slhc.h"
  15. #endif
  16.  
  17. #define SLIP_MAX 5        /* Maximum number of slip channels */
  18.  
  19. /* SLIP definitions */
  20. #define    SLIP_ALLOC    100    /* Receiver allocation increment */
  21.  
  22. #define    FR_END        0300    /* Frame End */
  23. #define    FR_ESC        0333    /* Frame Escape */
  24. #define    T_FR_END    0334    /* Transposed frame end */
  25. #define    T_FR_ESC    0335    /* Transposed frame escape */
  26.  
  27. /* Slip protocol control structure */
  28. struct slip {
  29.     struct iface *iface;
  30.     char escaped;        /* Receiver State control flag */
  31. #define SLIP_FLAG    0x01        /* Last char was a frame escape */
  32. #define SLIP_VJCOMPR    0x02        /* TCP header compression enabled */
  33.     struct mbuf *rbp_head;    /* Head of mbuf chain being filled */
  34.     struct mbuf *rbp_tail;    /* Pointer to mbuf currently being written */
  35.     char *rcp;        /* Write pointer */
  36.     int16 rcnt;        /* Length of mbuf chain */
  37.     struct mbuf *tbp;    /* Transmit mbuf being sent */
  38.     int16 errors;        /* Receiver input errors */
  39.     int type;        /* Protocol of input */
  40.     int (*send) __ARGS((int,struct mbuf *));    /* send mbufs to device */
  41.     int (*get) __ARGS((int));    /* fetch input chars from device */
  42.     struct slcompress *slcomp;    /* TCP header compression table */
  43.     struct iface *kiss[16];        /* sub nodes  AX25 only */
  44. };
  45.  
  46. /* In slip.c: */
  47. extern struct slip Slip[];
  48.  
  49. void asy_rx __ARGS((int xdev,void *p1,void *p2));
  50. void asytxdone __ARGS((int dev));
  51. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  52. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  53.     int del,int tput,int rel));
  54. void slip_status __ARGS((struct iface *iface));
  55.  
  56. #endif    /* _SLIP_H */
  57.